package com.ozo.cloud.common.sms.service;

import org.dromara.sms4j.api.callback.CallBack;

import java.util.LinkedHashMap;
import java.util.List;

/**
 * 短信服务类
 *
 * @author qiangesoft
 * @date 2024-09-06
 */
public interface SmsService {

    /**
     * 获取供应商标识
     *
     * @param configId
     * @return
     */
    String getSupplier(String configId);

    /**
     * 发送短信
     *
     * @param configId
     * @param phone
     * @param message
     * @return
     */
    boolean sendMessage(String configId, String phone, String message);

    /**
     * 发送短信
     *
     * @param configId
     * @param phone
     * @param messages
     * @return
     */
    boolean sendMessage(String configId, String phone, LinkedHashMap<String, String> messages);

    /**
     * 发送短信
     *
     * @param configId
     * @param phone
     * @param templateId
     * @param messages
     * @return
     */
    boolean sendMessage(String configId, String phone, String templateId, LinkedHashMap<String, String> messages);

    /**
     * 异步发送短信
     *
     * @param configId
     * @param phone
     * @param message
     * @return
     */
    void sendMessageAsync(String configId, String phone, String message);

    /**
     * 异步发送短信
     *
     * @param configId
     * @param phone
     * @param templateId
     * @param messages
     * @return
     */
    void sendMessageAsync(String configId, String phone, String templateId, LinkedHashMap<String, String> messages);

    /**
     * 异步发送短信
     *
     * @param configId
     * @param phone
     * @param message
     * @param callBack
     * @return
     */
    void sendMessageAsync(String configId, String phone, String message, CallBack callBack);

    /**
     * 异步发送短信
     *
     * @param configId
     * @param phone
     * @param templateId
     * @param messages
     * @param callBack
     * @return
     */
    void sendMessageAsync(String configId, String phone, String templateId, LinkedHashMap<String, String> messages, CallBack callBack);

    /**
     * 批量发送短信
     *
     * @param configId
     * @param phones
     * @param message
     * @return
     */
    boolean sendMassMessage(String configId, List<String> phones, String message);

    /**
     * 批量发送短信
     *
     * @param configId
     * @param phones
     * @param templateId
     * @param messages
     * @return
     */
    boolean sendMassMessage(String configId, List<String> phones, String templateId, LinkedHashMap<String, String> messages);

    /**
     * 异步批量发送短信
     *
     * @param configId
     * @param phones
     * @param message
     * @return
     */
    void sendMassMessageAsync(String configId, List<String> phones, String message);

    /**
     * 异步批量发送短信
     *
     * @param configId
     * @param phones
     * @param templateId
     * @param messages
     * @return
     */
    void sendMassMessageAsync(String configId, List<String> phones, String templateId, LinkedHashMap<String, String> messages);

    /**
     * 异步批量发送短信
     *
     * @param configId
     * @param phones
     * @param message
     * @param callBack
     * @return
     */
    void sendMassMessageAsync(String configId, List<String> phones, String message, CallBack callBack);

    /**
     * 异步批量发送短信
     *
     * @param configId
     * @param phones
     * @param templateId
     * @param messages
     * @param callBack
     * @return
     */
    void sendMassMessageAsync(String configId, List<String> phones, String templateId, LinkedHashMap<String, String> messages, CallBack callBack);

    /**
     * 发送延迟短信
     *
     * @param configId
     * @param phone
     * @param message
     * @param delayedTime
     * @return
     */
    void sendDelayedMessage(String configId, String phone, String message, Long delayedTime);

    /**
     * 发送延迟短信
     *
     * @param configId
     * @param phone
     * @param templateId
     * @param messages
     * @param delayedTime
     * @return
     */
    void sendDelayedMessage(String configId, String phone, String templateId, LinkedHashMap<String, String> messages, Long delayedTime);

    /**
     * 批量发送延迟短信
     *
     * @param configId
     * @param phones
     * @param message
     * @param delayedTime
     * @return
     */
    void sendMassDelayedMessage(String configId, List<String> phones, String message, Long delayedTime);

    /**
     * 批量发送延迟短信
     *
     * @param configId
     * @param phones
     * @param templateId
     * @param messages
     * @param delayedTime
     * @return
     */
    void sendMassDelayedMessage(String configId, List<String> phones, String templateId, LinkedHashMap<String, String> messages, Long delayedTime);

}
